Skip to content

perf: cache more semver ranges #2890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2021
Merged

perf: cache more semver ranges #2890

merged 1 commit into from
May 13, 2021

Conversation

merceyz
Copy link
Member

@merceyz merceyz commented May 13, 2021

What's the problem this PR addresses?

There are still some locations in Yarn that uses uncached semver ranges slowing down installs.

Continues #1738

How did you fix it?

Cache semverUtils.satisfiesWithPrereleases and ensure all places in the codebase using semver uses semverUtils.validRange for ranges

Result

Installing the Storybook repo

  ➤ YN0000: ┌ Resolution step
- ➤ YN0000: └ Completed in 1s 46ms
+ ➤ YN0000: └ Completed in 0s 881ms

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@merceyz merceyz requested a review from arcanis as a code owner May 13, 2021 15:17
@merceyz merceyz force-pushed the merceyz/perf/cache-semver branch from 8afa320 to 0ba45c4 Compare May 13, 2021 15:31
@arcanis
Copy link
Member

arcanis commented May 13, 2021

Is there an eslint plugin we could use to prevent some functions (like semver.valid) from being used? 🤔

@arcanis arcanis merged commit af927a3 into master May 13, 2021
@arcanis arcanis deleted the merceyz/perf/cache-semver branch May 13, 2021 18:29
@merceyz
Copy link
Member Author

merceyz commented May 13, 2021

There is indeed, we should be able to use https://eslint.org/docs/rules/no-restricted-properties

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants